﻿<%@ Page Title="贮存条件选择" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WhereSelectList.aspx.cs" Inherits="StoragePeriod.Web.StorageForecast.WhereSelect.WhereSelectList" %>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .center_table{height:30px;}
    .Center_Title{width:100%; height:25px; line-height:25px; padding-top:15px;padding-bottom:5px;}
    .Center_Title table{ font-size:14px; color:#f90; font-weight:600; height:25px; line-height:25px; width:100%; text-align:left; text-indent:1em;border-top:1px solid #ccc;border-bottom:1px solid #ccc; }
    
    </style>
    <script src="/Scripts/highcharts/highcharts.js" type="text/javascript"></script>
    <script src="/Scripts/highcharts/modules/exporting.js" type="text/javascript"></script>
    <%--<script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>--%>
    <script src="/Scripts/artDialog/artDialog.source.js?skin=default" type="text/javascript"></script>
    <script src="/Scripts/artDialog/plugins/iframeTools.source.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        //设置品质估算模型
        function SetCalculate() {
            var b = IsVerification();
            if (b) {
                var RawID = $("#MainContent_HidRawID").val(); // 原料ID
                var NormID = $("#MainContent_Drop_Norm").val(); //极限值ID
                art.dialog.open('/StorageForecast/StoragePredictions/StoragePredictionsEdit.aspx?RawID=' + RawID + "&NormID=" + NormID + "&Rid=" + Math.random(), { title: '贮存期预测模型' });
            }
        }

        //验证
        function IsVerification() {
            var b = true;
            if ($("#MainContent_HidRawID").val() == "") {
                alert("请选择原料！");
                return false;
            }
            if ($("#MainContent_Drop_Norm").val() == "" || $("#MainContent_Drop_Norm").val() == null) {
                alert("请指定推荐极值，若没有则需要通过管理员进行设置！");
                return false;
            }
            return b;
        }

        //品质估算验证
        function IsVCalulate() {
            var b = true;
            if ($("#MainContent_HidRawID").val() == "") {
                alert("请选择原料！");
                return false;
            }

            if ($("#MainContent_txt_licunTime").val() == "") {
                alert("请输入库存时间！");
                return false;
            }

            if ($("#MainContent_Drop_Norm").val() == "" || $("#MainContent_Drop_Norm").val() == null) {
                alert("请选择对应的极限值！");
                return false;
            }
            return b;
        }
    </script>
</asp:Content>
 
  <asp:Content ID="BodyContentLeft" ContentPlaceHolderID="MainLeft"  runat="server">
            <h2><asp:Label ID="Left_Title" runat="server" Text="贮存条件选择"></asp:Label></h2>
            <div class="Left_Main">
                <h3>原料列表</h3>
                <div class="Left_Rawlist" style="height: 360px;">
                    <asp:TreeView ShowLines="True" ID="NutrientsTree" Style="max-height: 320px; text-align: left;"
                        runat="server" OnSelectedNodeChanged="SysTree_SelectedNodeChanged">
                        <SelectedNodeStyle Font-Bold="True" BackColor="#0072BB" ForeColor="#ffffff" />
                    </asp:TreeView>
                </div>
                <div class="Left_Search" style="height: 60px;">
                    <ul>
                        <li><asp:TextBox style="width: 106px;" ID="Txt_Search" runat="server"></asp:TextBox></li>
                        <li><asp:Button ID="btn_search" class="btn_search" runat="server" Text="" onclick="btn_search_Click" /></li>
                    </ul>
                    <div class="clearboth"></div>
                    <ul style="margin-top:6px;">
                        <li style="width:70px"><input type="button" value="添 加" onclick="addNew()" class="rbtn_02" /></li>
                        <li><asp:Button ID="btn_Del" runat="server" Text="删 除" OnClientClick="return DeleOption()" OnClick="btn_Del_Click"  class="rbtn_02" /></li>
                    </ul>
                    <div class="clearboth"></div>
                </div>
            </div>
</asp:Content>

<asp:Content ID="BodyContentRight" ContentPlaceHolderID="MainContent" runat="server">
<div class="Right_title" id="Right_title" style="height:32px; background-position:0px 0px;">
    <ul>
        <li id="Right_title_li_0" showid="0">贮存条件选择</li>
    </ul>
</div>

<div class="Right_center" style="height:450px;">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:HiddenField ID="HidRawID" runat="server" Value="" />

    <asp:HiddenField ID="HidPageId" runat="server" Value="0" />
    <asp:HiddenField ID="HidPageIndex" runat="server" Value="1" />
    <asp:HiddenField ID="HidPageCount" runat="server" Value="1" />
    <asp:HiddenField ID="HidImgID" runat="server" Value="0" />
    <asp:HiddenField ID="HidIsNext" runat="server" Value="1" />
    <!--贮存期预测 Start-->
    <div id="center_0"> 
    <div class="center_Main displayblock">
        <div class="center_table">
            <table cellpadding="0" cellspacing="0" width="100%">
                <thead>
                    <tr>
                        <td width="200px;">
                            单位：
                            <asp:DropDownList ID="Drop_OperationSearch" runat="server" style="width:100px;" 
                            onselectedindexchanged="Drop_OperationSearch_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                        </td>
                        <td align="left">
                            班组：
                            <asp:DropDownList ID="Drop_TeamSearch" runat="server" style="width:100px;"></asp:DropDownList>
                        </td>
                    </tr>
                </thead>
            </table>
        </div>
        <div class="center_btnlist">
            <ul>
               <li style="width:160px;"><asp:Label ID="lbl_SelRawName" runat="server" Text="已选原料："></asp:Label></li>
               <li style="width:60px;">控制指标：</li>
               <li style="margin-left:0px;width:85px;">
                   <asp:DropDownList ID="Drop_Targets" runat="server" onselectedindexchanged="Drop_Targets_SelectedIndexChanged" AutoPostBack="true">
                   </asp:DropDownList>
               </li> 
               <li style="width:60px;">二级指标：</li>
               <li style="margin-left:0px;">
                   <asp:DropDownList ID="Drop_TargetsInfo" runat="server" OnSelectedIndexChanged="Drop_TargetsInfo_SelectedIndexChanged" AutoPostBack="true">
                   </asp:DropDownList>
               </li>
               <li style="width:60px;">推荐极值：</li>
               <li style="margin-left:0px;">
                    <asp:DropDownList ID="Drop_Norm" runat="server">
                   </asp:DropDownList>
               </li>
               <li style="float:right; margin-right:10px;"><input id="btnParameterSet" value="计算公式"  class="btn_0" onclick="SetCalculate()" /></li>
            </ul>
            <div class="clearboth"></div>
        </div>

        <div style="width:100%;padding-top:10px;border-top:1px solid #ccc;">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tbody>
                    <tr>
                        <td style="width:100px;padding-bottom:3px;" align="right">期望贮存时间：</td>
                        <td style="width:100px;padding-bottom:3px;" align="left"><asp:TextBox ID="txt_licunTime" runat="server" CssClass="input" style="width:60px;"></asp:TextBox>(天)</td>
                        <td style="padding-bottom:3px;" align="left"><asp:Button ID="Btn_Calulate" runat="server" Text="贮存温度计算" CssClass="btn_1" OnClientClick="return IsVCalulate()" OnClick="Btn_Calulate_Click" /></td>
                    </tr>
                    <tr>
                        <td align="right">贮存适宜温度：</td>
                        <td align="left"><asp:TextBox ID="txt_Temperature" runat="server" CssClass="input" style="width:60px;"></asp:TextBox>(℃)</td>
                        <td align="left"><asp:Button ID="Btn_SaveCalulate" runat="server" Text="确认保存" CssClass="btn_1" onclick="Btn_SaveCalulate_Click" /></td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>
    <!--贮存期预测 End-->
    <div style="width:100%;padding-top:10px;">
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tbody>
                    <tr>
                        <td width="85px" valign="top">贮存提示：</td>
                        <td align="left"><asp:Label ID="lab_StoragePrompt" runat="server"></asp:Label></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</div>

<div class="Right_foot">
    <img src="/images/images_29.jpg" width="764" height="8"/>
</div>
</asp:Content>